package com.pe.pgn.clubpgn.domain;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.compass.annotations.Searchable;
import org.hibernate.annotations.Type;

@Entity
@Table(name = "clpb_segmentacion")
@Searchable
public class ClpbSegmentacion extends CamposAuditoria{

	private static final long serialVersionUID = -4061802409460339897L;
	private Long id;
	private BigDecimal condicion1;
	private BigDecimal condicion2;
	private String parametro;
	private boolean stSegmentacion;
	
	@Id
    @Column(name="id")
    @SequenceGenerator(name="seqsegmentacion", sequenceName="seq_segmentacion")
    @GeneratedValue(generator="seqsegmentacion")
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "condicion1", length = 30, nullable = false)
	public BigDecimal getCondicion1() {
		return condicion1;
	}

	public void setCondicion1(BigDecimal condicion1) {
		this.condicion1 = condicion1;
	}

	@Column(name = "condicion2", length = 30, nullable = false)
	public BigDecimal getCondicion2() {
		return condicion2;
	}

	public void setCondicion2(BigDecimal condicion2) {
		this.condicion2 = condicion2;
	}

	@Column(name = "parametro", length = 250, nullable = false)
	public String getParametro() {
		return parametro;
	}

	public void setParametro(String parametro) {
		this.parametro = parametro;
	}
	
	@Column(name = "st_segmentacion", nullable = false)
	@Type(type = "yes_no")
	public boolean isStSegmentacion() {
		return stSegmentacion;
	}

	public void setStSegmentacion(boolean stSegmentacion) {
		this.stSegmentacion = stSegmentacion;
	}

	@Override
	public String toString() {
		return "ClpbSegmentacion ["
		+ "  id=" + id
		+ ", condicion1=" + condicion1
		+ ", condicion2=" + condicion2
		+ ", parametro=" + parametro
		+ ", st_segmentacion="+stSegmentacion
		+"]";
	}

	@Override
	public boolean equals(Object o) {
		return false;
	}

	@Override
	public int hashCode() {
		return 0;
	}
}
